public class Leet9 {
    public static void main(String[] args) {
        Leet9 l = new Leet9();
        System.out.println(l.isPalindrome(121));
    }
    public boolean isPalindrome(int x) {
        if (x<0)
            return false;
        String a = String.valueOf(x);
        String b = new StringBuilder(a).reverse().toString();
        return a.equals(b);
    }
}
